Add heartbeat parameter to _changes REST API

Add heartbeat (CRLF ping) to _changes REST API in continuous and longpoll mode. The heartbeat parameter will accept a value in millisecond and the value needs to be more than zero. #426
Nothing ever calls stopHeartbeat; that means the router object will stay around forever and be leaked (since NSTimer retains its target.) The timer needs to be explicitly stopped when the connection closes.