Complete implementation of retrieving annotations in an ad-hoc manner

Also unify Attribute equals and hashcode