rustpkg: Handle non-numeric versions; some cleanup

r? @graydon    Package IDs can now be of the form a/b/c#FOO, where (if a/b/c is
    a git repository) FOO is any tag in the repository. Non-numeric
    tags only match against package IDs with the same tag, and aren't
    compared linearly like numeric versions.
    
    While I was at it, refactored the code that calls `git clone`,
    and segregated build output properly for different packages.