Implement PKI signing for authentication tokens

Switches the algorithm used to sign JWT tokens from shared secret HMAC
to PKI signing. The same key pair used for HTTPS is reused for tokens.

Default configuration changed to enable TLS for testing and test script
modified to automatically generate the test PKI cert tree.

Areas for improvement:
* Current code assumes the private key PEM file is NOT password protected
* Remove the use_tls option entirely and only support HTTPS mode since
  we need the certs anyway for tokens
* Make the loading of pub and priv keys for JWT signing more efficient
  by caching the strings in memory instead of reading from disk every
  time