add hashcode and equal method for quaternions