firmware: Don't set state during ACTION_IDLE

The state variable isn't used during idle and is set after a reset
anyway.
firmware: Prevent possible race conditions

In the mainloop, make sure that the "action" variable is changed last.
Otherwise, if the INT0 interrupt would fire before setting up the
relevant flags or other state, it might take the wrong action. By
setting up action last, INT0 will either do nothing (when action is
still ACTION_STALL) or have the right flags if the action has been
changed.
firmware: Don't claim bus address on aborted enumeration

Before, when an enumeration was aborted by the master, each unenumerated
client would take the "current" address in bus_addr. Now, the address
stored in bus_addr is only considered valid after the enumeration round
completes.
firmware: Remove unused global
firmware: Fix comment
firmware: Add TODOs.
firmware: Remove some unused code