Add support for custom template names

Adds the `name` option to `compileClient` and adds `--name` and `--name-after-file` to the command line.

Thanks to @dscape for initial work on this feature

Could @bloodyowl or @jbnicolai review this please?  I've added some initial tests for the command line, which we can extend over time.  This aims to implement #1493 in a way that is a little bit cleaner.  I think name-after-file is an option that is only useful for command line clients, while it's far more generally useful to be able to just choose a name.