Generate parsoid cookies from the flow manager

When the $wgFlowParsoidForwardCookies flag is set that means parsoid
needs a Cookie header passed or it will be unable to make requests
back to the wiki.  From maintenance scripts there is no cookie to forward,
so this tries to mock one up only when PHP_SAPI === 'cli'.

Change-Id: I9775385a6091cb4e5d9bcdba789a7494447fff6e