Refactor aliased.pm to allow modules to be built on top of it

This refactoring allows for interesting modules built on top of
aliased.pm's underlying technology, for example
http://github.com/belden/aliased-constructor