Refactor common code into a generator

Each of these modules had the exact same code with one string changed.  This moves all of this code into a common generator, then refactors all of the transforms modules to use it.
`model: Model` will match the rest of the Bokeh codebase.