PolarSSL: Drops polarssl v1.1 support.

Signed-off-by: Sonny Karlsson <ksonny@lotrax.org>
PolarSSL: Fixes error where connection isn't terminated on error.

Signed-off-by: Sonny Karlsson <ksonny@lotrax.org>
PolarSSL: Enable session cache.

Sets session cache on ssl context.
Moves pk_context to local thread context to allow use of polarssl
compiled without threading support.

Signed-off-by: Sonny Karlsson <ksonny@lotrax.org>