Ref T1049. This allows users to a queue a build restart even if the build is currently restarting. We encountered an issue where a build was in "restarting" status, but there was no HarbormasterBuildWorker task in the queue to actually restart the build. In this scenario, there was no way to restart the build other than go into the DB and remove the command manually, which is obviously not practical for most users.
By allowing users to restart at any time, it means build can't get stuck like this, because at the very least, it'll place another build worker in the queue which will also process any other commands (like pausing or resuming) as well.