Simplified ref/dref. Renamed ref to ptr to prevent ambiguity with
std::ref. Fixed a wrong usage of dref in vector indexation that would
cause bugs/crashes whith optimizations enabled.
Added pretty_type() macro.