Sort keys for deterministic results

keys() produces a random output order. Producing a well
defined output makes things easier, so sort the keys.
Fix Issue #49: use of %{$data->{IMPORTS}} can dereference undefined value

Refactor the logic for generating IMPORTS lists so it
guards the dereference better, and uses a deterministic
output ordering. Since there were two identical code paths
that did this, they we both replaced with a call to a sub.
Bump versions, update changes, and fixup manifest for 6.65_01