Fixes #182. Refactor REST services to not be so timing dependent.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/intel-hadoop/gearpump/183)
<!-- Reviewable:end -->