Use command templates for batch system commands

@hjoliver This change should address another concern you raised at #1183. It should improve the user interface for the command template of `at`. I have also modified the logic to accept string templates for the poll and kill commands. (In theory this should make it possible for us to expose those commands as configurable settings in the future.)