Unit/regression test for TLS heartbeats.

Regression test against CVE-2014-0160 (Heartbleed).

More info: http://mike-bland.com/tags/heartbleed.html

As per Ben Laurie's encouragement:
https://groups.google.com/d/msg/mailing.openssl.dev/ge4PIs3byZk/Uhp0vLoGlEMJ

This should supercede Pete Dettman's earlier request on my behalf, made before the code was adapted to OpenSSL style (and was more in the Google style): https://github.com/openssl/openssl/pull/67

I've ported this commit to other branches; the only conflicts were in test/Makefile. It currently passes in:

OpenSSL_1_0_1-stable
ported commit: ab566803bb1cf8dfe19e0675ce7a988d33ded9f3

OpenSSL_1_0_2-stable
ported commit: 58341faeccee50738b26e39bd1bbc7c1141432ce

It currently fails and aborts in these branches, which contain the Heartbleed flaw, but not the fix:

1.0.2-aead
ported commit: e16255ce26b13a512a749ab85be3674df0277697

supplemental-data-api-2
ported commit: d773bf6ce32b90c328357b623728b9ccd39ed711

Cherry-picking commit 731f431497f463f3a2a97236fe0187b11c44aead should allow these failing tests to pass.