Rewrote the REST generator to use a custom UICommand.

This ensures that the JPA entities are not prompted for twice,
and also that the REST resources generated by the wizards
support the application/json media type.