Motherwell manager Stuart Kettlewell has handed in his resignation after nearly two years in charge of Fir Park following fan unrest that led to "personal abuse" the boss could no longer tolerate.