extend encode to accept a header extension object to allow jku, kid, xtu...

..., and x5t to be set

To allow reserved (or unreserved) parameter names for the JWT header to be set (http://tools.ietf.org/html/draft-ietf-jose-json-web-signature-02#section-4.1).