Changed CommandExecuteTask to run all commands in the correct order

Commands are queued up to run, they are then run in sequence in the main thread.

Cap on execution time (500us) to prevent commands from stealing too much CPU time.