fix long-standing pending_connect/inactivity timeout issue

this reverts a change made for #374, which inadvertently disabled inactivity
timeouts altogether.

instead we always QueueHeartbeat when bConnectPending changes, so
GetNextHeartbeat can calculate a timeout based on the new connection
state. i confirmed this fixes the broken test on master, and the original
"20s delay" bug (using the repro in #393).

this should also address the timeout stacking issue reported in
igrigorik/em-http-request#149, as well as the original report in
igrigorik/em-http-request#222
use hack from luislavena/rake-compiler#36 to work around rake-compiler bug (fixes #222)
v1.0.2