Update chess.py

Done check functionality (incl preventing moves that leave you in check), working on checkmate. Also added some generic utils.