Unify new_batch_from_commands error responses
I suspect I’ll copy+paste a lot of this code for the second “new batch”
handler (PagePile), but I can at least reduce it a bit by extracting
some of the error message HTML construction into a proper template. Also
the previous code was all over the place – this should look much nicer
for the user as well. (Although a lot of these errors should never
happen™ due to client-side validation.)