Parse plugin parameter earlier
Parse plugin parameter earlier

Also move the definition of the generator context instance to the
top, thereby avoiding the need to pass it as a parameter.

This is in preparation for an alternate and more powerful plugin
parameter syntax.

dr-joy/protoc-gen-doc,pseudomuto/protoc-gen-doc,DengKe1994/protoc-gen-doc,pseudomuto/protoc-gen-doc,dr-joy/protoc-gen-doc,estan/protoc-gen-doc,DengKe1994/protoc-gen-doc,DengKe1994/protoc-gen-doc,estan/protoc-gen-doc,DengKe1994/protoc-gen-doc,estan/protoc-gen-doc