Optimizations for hashcode, equals & toString

Relates to:
https://jira.dev.bbc.co.uk/browse/IBL-1635