Implementation of multimedia editor.

This commit contains the changes by @qutorial and @bibstha that
implement a more sophisticated card editor, which includes the ability
to import photos and audio directly from the device.

This is squashed done version of a number of changes that were made,
with my own edits to remove changes that are not related to the feature
itself.