Adds “factory method” syntax.

Adds factory as a keyword, and makes factory method
equivalent to method returning an object.