Fix relative class name functionality

Remove the old implementation of the relative class name functionality
as this has bugs, leading to classes not being loaded.The new
implementation catches relative class names when they are first
encountered and converts them into absolute class names straight away.
Also add some tests for the relative class names.
11 files changed