recent: Use MIME type instead of application name

This is probably more correct, but actually motivated by
https://bugzilla.gnome.org/show_bug.cgi?id=695970
recent: Set contains bitfield so that the filter actually works

See https://bugzilla.gnome.org/show_bug.cgi?id=726900
WIP: Port to C++