added local flag & master_timeout support to cluster pending tasks api (0.90)

This PR was created against 0.90 branch so that we can backport to 0.90, in a backwards compatible manner, the support for `local` flag and `master_timeout` in cluster pending tasks api.

With #3345 we added support for the `local` flag across the board to all cluster state read operations. The change was only applied to master and 1.x branches though, while having `local` flag and `master_timeout` support backported to 0.90 for cluster pending tasks api would help a lot.