Add extensions to the generator.

R=r
CC=golang-dev
http://codereview.appspot.com/774041
9 files changed