Fixed session handling on OS X.

On OS X, it appears that getsid() returns ESRCH for zombie processes.

Review: https://reviews.apache.org/r/13396
Rewrote os::read(string path) to use getline.

The existing implemenation does not work well when used to read
files in the /proc pseudo filesystem.

From: Jiang Yan Xu <yan@jxu.me>
Review: https://reviews.apache.org/r/13387
Changed proc::status(pid) to use os::read().

This was changed because ifstream threw unexpected exceptions.

From: Jiang Yan Xu <yan@jxu.me>
Review: https://reviews.apache.org/r/13388
Improved the ReaperTest by using os::Fork.

From: Jiang Yan Xu <yan@jxu.me>
Review: https://reviews.apache.org/r/13389
Fixed a performance issue in Master::Http::stats().

We spent a lot of time doing unnecessary range additions
(e.g. ports resources).

From: Jie Yu <yujie.jay@gmail.com>
Review: https://reviews.apache.org/r/13433