IDL compiler: sync Python to r166626

Python side to:
Move encoding module to oilpan
https://codereview.chromium.org/156453002

Also refactoring of local variables into template contents.

BUG=239771
TBR=haraken
NOTRY=true

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

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