thumbnail generation and disk caching

// FREEBIE
fix recipient handling for media preview

// FREEBIE
merged  WhisperSystems/master