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
That's integer division so it's going to lose fractions (i.e. `hearbeat=500` will result in 0.0 sec.) Not a big deal probably, but it should be changed to `/ 1000.0`.