Move stamina usage, restoration and loss into a single synchronized function.