serialize JID to allow json serializing
only schedule whitespace keepalive if enabled
fix mutable default arguments :boom:
cleanup semicolons, whitespace and mutable default arguments
Merge pull request #308 from Mayflower/develop

Serialize JID to allow json serializing