master_timeout parameter is now taken into account when calling cluster pending tasks api through the REST layer

Closes #4806