make-wmf-branch: factor out php sapi == cli check

Will add a second utlity based on the MakeWmfBranch class, move the
check for sapi == PHP in a different file so it can be reused.

Change-Id: Ia4945a1b1eecbd82d2787a8dea66bfa1bcdd5633
Merge "make-wmf-branch: factor out php sapi == cli check"