Fixed a bug that caused tests to hang.

On a related note, it seems that any time something gets raised in the
server Thread in the tests, it just hangs, because that thread crashes,
it's output gets gobbled, and the client waits forever for a response. I
really need to come up with a better solution, but want to avoid
wrapping everything in a begin/rescue
Starting to get the heartbeat stuff working

This is only on service registration at the moment, but I'm going to be
adding the periodic checks soon.
Start of proper heartbeat check

This is just the start of getting the periodic checks going. It still
doesn't remove or re-add the services, but it does at least do the check
and do it more-or-less correctly.
Service removal and re-addition for heatbeats

Now, if a service goes away, it will no longer be returned in search
results. However, on a shedule of twice as long as the default heartbeat
timer it will continue to be checked. If the check is successfull in
that time, it will be automatically re-instered into the "good" list and
be available in search results.
Test fixing

Because the ruby garbage collector doesn't really collect all garbage
(that is, it doesn't clean up resources for you), and ruby finalizers
are considered bad form (plus, they can't actually access the object
being finalized; kind of defeats the point), plus the fact that I was
being a bad lazy programmer and not releasing resources when I was done
with them, the tests would spiral out of control and crash the computer.
I fixed that here by actually closing down my threads and sockets when I
didn't need them anymore.
More test fixing

The Client tests were failing because of the new requirement that a
service have a heartbeat to be registered. I went ahead and moved the
heartbeat testing server creation and shutdown to the suite level in
spec_helper so I don't have to think about it again.