action_derivedsourcesallinone.py: Fix Python style and conditional bug

This fixes Python style in action_derivedsourcesallinone.py
per Eric's request:
https://codereview.chromium.org/24053003/#msg35

It also makes the code more Pythonic and a bit better-factored,
though it's admittedly not esp. beautiful.

I also noticed that the code was broken, due mostly to a wrong regex,
so I've fixed that so it now inserts if/endif conditionals into
derived sources.
HOWEVER, this makes linking fail (in SVGs), so turned off for now.
(This hasn't worked for a while.)
The code is fixed, so it's just a question of figuring out the
conditional problem and turning it back on
(or removing this code).

Review URL: https://codereview.chromium.org/26802002

git-svn-id: svn://svn.chromium.org/blink/trunk@159445 bbb929c8-8fbe-4397-9dbb-9b2b20218538