Bug 998372 - part 1 - lift regex construction out of FindProxyForURL; r=jmaher
Bug 998372 - part 2 - lift origins out of FindProxyForURL and make origin lookups more efficient; r=jmaher
Bug 998372 - part 3 - remove swathes of conditional logic from FindProxyForURL; r=jmaher
Bug 998372 - part 4 - explain the escape-fest in permissions.py better; r=jmaher