Sign then Encrypt

Ok. Hopefully this addresses all the past feedback. I tried to simplify the PR and still get what we need in. This one is also a prerequisite for #840 as mentioned below. @Renelvon @gubatron take a look.
No, that's irrelevant. I proposed to change `if msg.get('type') is None` to the equivalent `if 'type' not in msg`. Both versions assume that `msg` is a `dict`. The newest patch deletes the line `msg = json.loads(serialized)` and works on `serialized`, which I assume is a string. This doesn't work as expected:
```bash
renelvon @ merchant ~/Repos/OpenBazaar (develop) % python2
Python 2.7.6 (default, Mar 22 2014, 22:59:56) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import json
>>> d = {'foo':'type'}
>>> sd = json.dumps(d)
>>> sd
'{"foo": "type"}'
>>> 'type' in d
False
>>> 'type' in sd
True
>>> 
```