Update REST API to support Stopped, Idle and Offline states and continuous, longpoll responses

This update will update the active_tasks API to support the features needed to find out the states of the replication as well as the ability to get continuous and longpoll responses from the active_tasks API.