Restore defvars; refresh after marking a task as done

You were right about the defvars as a way to remove byte compilation warnings. =) Also, I changed the done hook to refresh the deadline to the next losedate as a way to more easily keep track of closer deadlines.