Massive API changes

Some unused import were removed.
Many functions were replaced with similar global variables.
'mknodevers_prefix()' is now less destructive:
Instead of trying to remove an entire tree simply because a directory
is missing, it will now just create the missing directories.
Many functions were renamed.
Some useless functions such as 'get_real_version_dir()' were removed.
Many functions were cleaned up.