Add selectable debug flags

Add multiple selectable debug flags intead of a single boolean value.
On the command-line:
  --debug       means  --debug=in,time
  --debug=in    shows the input received from the shell
  --debug=time  shows the time taken in the angel (on supported shells: bash, mksh)
In the environment:
  APS1_DEBUG=1  means  APS1_DEBUG=in,time
  APS1_DEBUG=in means  --debug=in