Refactored subprocess to support more IO redirect modes.

Review: https://reviews.apache.org/r/22688
Updated mesos to use the new Subprocess API.

Review: https://reviews.apache.org/r/22702
Allowed launching subprocesses with flags.

Review: https://reviews.apache.org/r/22749
Updated mesos to use the new Subprocess interface with flags.

Review: https://reviews.apache.org/r/22751