refactor(caPatchService): separate patching functions into modular file

To help maintain more focused code, the functions for patching DOM APIs are separated
into their own file and given a separate test file. Additionally, the code is
refactored to avoid implicit globals, exposing only a single global 'patchServices'.

#9