Update coder.py

Move the writing of extra_source codes(i.e. initializer, looper) after the variable declarations so the variables could be used.
Minor hotfix release to re-order generated code.