Add media attachment types as contexts

The media connector now references the media type as the context,
instead of simply repeating the connector (‘Media’).

The media types are borrowed from wp_ext2type() in
wp-includes/functions.php.

(also - this is my first Stream commit!)
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?
Merge pull request #294 from lukecarbis/issue-260

Use media attachment types as contexts
Do upgrade routine if less than 1.2.8