compiler: Use backend interface to build function code.
https://codereview.appspot.com/83750044/#msg3
https://codereview.appspot.com/83750044/#msg6
Merge branch 'build_function'