Fixed potential problem in grab motor

With the grab and release tasks, it is possible to make the robot
attempt to grab and release the goal simultaneously, which will probably
make the motor burn out. This fix uses a static bool to make check if
the hook is in use by another task before starting to grab or release