Strengthen type safety for direct and indirect memory writes

* Add DirectWriteEvent and IndirectWriteEvent classes
* Remove virtual functions on ReadInstr<T> to Z3WriteEncoder
* Instead, use type safe IndirectWriteEvent::deref_instr_ref()
* Remove dependency between Z3WriteEncoder and Z3ReadEncoder
* Use only Z3 forward declaration for ReadInstr<T> virtual functions
* Create type safe Recorder::instr() member functions for direct and
  indirect write events