ImageReference is supposed to be wrapper around existing data array of
some type which is passed to Magnum functions. Thus modifying the
original data array (which must be kept somewhere for proper deletion)
is much better option than casting the pointer returned by data() to
some proper type and then operating on that. Hopefully this won't break
any existing code.
It looks like I forgot to `delete` three times in the tests. It just
proves that the previous API was flawed (or unusable for people spoilt
with RAII like me).
Not sure how to handle everything properly (e.g. namespaces and naming
for implementation classes, tests...), will update coding style for
plugins accordingly later.