Do all draw checking in the database

Make dbo.MayClaimDraw responsible for checking 3-move repeats and the 50 move rule.