Add a check in jwt.encode for data type.

When using latest version of pyjwt, I get some strange errors because I was trying to encode strings with pyjwt. As JWT rfc explicitly refers to json object, I added a check in jwt.encode for raising an exception if we try to pass something else than a mapping.