Fixed minor scheduling issues.

1) Made service calls thread safe.
2) Fixed order of calls in cancellation
3) Removed blocking assumption in demand task in scheduler
4) Changed bounding of tasks based on current execution time.