Multi-key TLS and a couple of fixes/improvements

cc @trevnorris