Introduce a dynamic poller to remus instead of a fixed polling interval.

Change-Id: If55143046eb7b7453a96c1fcb426f8098a5e4b6e
Update the worker to use the new dynamic poller.

Change-Id: I6734e2d89d7bd8115b964ea90aaf8e8204fd058f
Workers now send to the server how soon they expect to heartbeat next.

Rather than have the server presume when a worker will next heartbeat,
we now have the worker sending the worst case scenario of when it will
heartbeat.

Change-Id: Ic73c87095eb2a157eec8fd7bcd4e38564b4cc3b2
Workers are now more efficient about resending the full job requirements.

We only send the full job requirements when we state we can mesh, rather
than at can mesh and make mesh

Change-Id: I552629e1641a1142add9662e7f5090ac3b7c1a69
Introducing the SocketMonitor the advanced way to determine when workers die.

Change-Id: Ia765cb431a32d5572e43eb5f55dc1822c35a6d0e
ActiveJobs now interfaces with SocketMonitor to determine worker health.

Instead of ActiveJobs determine when a worker dies, using a fixed heartbeat
interval, it now queries the SocketMonitor. The SocketMonitor does dynamic
heartbeat interval to support workers that are a sleep.

Change-Id: Ibcbf3de088995ecbb979eda5ed6b7f11e5acbb7e
Remove unneeded tracking of when we dispatched jobs.

We never did anything with this information so lets remove it.

Change-Id: Ice3b607fd07145ab5521261586f457ba7765e4f0
WorkerPool has been upgraded with numerous new features.

WorkerPool now supports workers that want multiple jobs with the same
requirements, by keeping a worker in the pool as long as it wants more jobs.
The WorkerPool now also supports the ability for a worker to desire different
job requirements properly.

Lastly WorkerPool has been updated to interface with SocketMonitor to determine
when workers die. Rather than remove dead workers we flag them invalid and
ignore them in-case they come back.

Change-Id: I7317c333d770af3eab5cc0104ab170e583a80cbd
The server uses lighter locks and unique_lock was not needed.

Change-Id: I011d66938c46404670a082833614252e206fdcfc
Server now has dynamic polling, better heartbeating, and worker pool.

The server now understands the terminate call being sent from a worker,
also now understands the new heartbeat message which states when the
socket should heartbeat next. It has also been updated to use the SocketMonitor
so that it can handle connections that dynamically change the heartbeat
interval.

Change-Id: I4f9dba5c29eabe1613d15b12452c92a753592fe4
fixed polling duration on server and worker to be in milliseconds.

Change-Id: Ia968c85346529ebc7b71d0377d674634c2722a0c
Small tweak to WorkerPool API with a better method name.

Change-Id: Ia52ec6b5ab03bc7a6558d581e9814b9359c8c1c7
Fix bug in worker pool return an iterator 1 past the value we want.

Change-Id: Idfc43e6460261eed80c3b56e6c0da6533fb73736
WorkerPool now dispatches jobs to multiple workers of the same type better.

Before we also gave a job to the first worker that said it could handle
it, which preferred workers that joined first. Now once a worker takes
a job it goes to the back of the line. This will allow us to load balance
jobs better between workers that all want multiple jobs.

Change-Id: I824859c55800d65d09ecc5788c21828c721dd61a
Fixup SocketMonitor to properly add new sockets.

Change-Id: I215c58bb77086122e1534f26acfe256bbefdc9f7
Add in print statements to help verify this works on mavericks.

Change-Id: Ia9e76cf2f1e3df3e92055e7b76dc867f26914b23