cleanup frame processing and payload alignment

- remove a level of indentation making frame processing easier to read
- use qFromBigEndian(const uchar *src) to ensure alignment of payload size