Fixed get_attachment_type()

Was returning translated string instead of context key. Also added
spaces around variables in square brackets.

Is it work making lines 80-82, and 86-88 shorter?
$extension_type = isset( $context_labels[ $extension_type ] ?
$extension_type : ‘document’;

I opted for (imho) a more readable version.
Simplify $parent_title variable
Change the context for old entries to the attachment type - draft

Still trying to get my head around this. Am I going about this the
right way, or is it time to stop for a coffee?