Add an option to generate setters before getters.

Fixes #27.

N.B. This is based on my PR #33, so may need rebasing if/when that is merged.