Performance improvements for astropy.units

- For compose, the set of destination units are prefiltered to only
  include units that have bases in common with "self".  This cuts down
  on the search space considerably in most cases.

- Inline some delegation functions.

- Replace 2 isinstance calls with 1

- Cache the hash of composite units, which can be expensive to compute.
Add CHANGES entry.
Use lazyproperty
Merge pull request #2544 from mdboom/unit/performance2

Performance improvements for astropy.units