Profile: cache code address lookups in a dict

This greatly improves the performance of Profile.print()
Profile: extract portable profiling results (Profile.retrieve())

By switching from Uint to templated functions, this should work
across machines with different word sizes.
Profile: improve docs