Implemented Motor::brake() function