Implemented deactivate function.

This also changes the active and deleted to use integers rather than strings for their values. This was causing a problem in goal.html when testing if a goal was active.