Rewrite the forge client handshake handler to try to make it more resilient, and first attempt at resetting the client state by sending a LoginSuccess packet.

The commit moves all the scattered forge client handshake logic into Forge specific classes, and using that as a handler. An enumeration is then used to define the behaviour at each step - which should hopefully make it easier to follow how a Forge server connects to it's clients.

As suggested in issue #899, I've included a resetHandshake method that sends a LoginSuccess packet. It doesn't seem to work at the moment (I still can't get the client to resend the handshake), but it's possible it's sending the wrong packet - it should be easy to replace if it turns out this is the case.