Fix heartbeat_test for -DOPENSSL_NO_HEARTBEATS

Replaces the entire test with a trivial implementation when
OPENSSL_NO_HEARTBEATS is defined.