[NamedPipe] Support an optional GMainContext.
[NamedPipe] Apply the optional GLibMainContext for the timer.

The event handlers of the pipes and the timer have to be invoked
on the same context to avoid race.
[NamedPipe] Remove GLib events correctly even if their context is not default.
Merge pull request #697 from project-hatohol/named-pipe-with-optional-context

NamedPipe with optional context