Miscellaneous refactorings.
Fixed infinite loop when receiving a SETTINGS frame.
Properly implemented hashCode() and equals().