Document and optimize the new FSMLockMixin code

Hi, what a coincidence, yesterday I just started working on the implementation myself. As I see you have already done it, so I've taken what I think is the best from both versions and pushing it upstream. I think some parts can be done a bit better than in django-optimistic-lock, so I've changed mostly those.

Also, I've documented the code so that it's more clear what it really does.