BSON encoding/decoding hooks now use a CopyOnWriteArrayList for performance

COWList to store the transformers, cleaned up and shared the hooks code with a Hooks class