make the cached state more useful by recording source states and selecting which ones to use

Signed-off-by: Islam Amer <islam.amer@jollamobile.com>
make uploader more useful for uploading binary attachments

Signed-off-by: Islam Amer <islam.amer@jollamobile.com>