secure <metadata_raw>

currently, the raw metadata snippet is placed in the media file’s page in an
HTML commented <metadata_raw> tag. the concern is that the raw metadata may
contain a closing HTML comment tag. this patch handles this situation using
htmlspecialchars().

Change-Id: I64d70d84d09130202f20123915e34d1b66e5cbcb
re-work exception handling

Gergő Tisza was concenred about the fact that the extension was catching MWExceptions.
the solution we agreed upon was to use an extension specific exception object for user
errors and another for system/non-user correctable errors, which has been implemented
in this change-set.
a few files also include php doc clean-up, shortening of lines > 100 characters, and
removal of a few functions no longer used by the extension.

Change-Id: I4b38aab545a2be858a959e92cdabbea9caab563a