refactor constant definitions and usage
add support for keepAlive interval field

* finish helper method to get its buffer format
* add sanity checking test
* refactor maximum supported keepAlive time interval into constant
* refactor maximum supported protocol version into constant