Fix ping being called on a null connection
Send offline ping only when the connection is set
Make setConnection/abandonConnection symmetric

Stop the activity check in the abandonConnection method instead of 
scattering it around the class. It’s set in setConnection, so this makes
the code more consistent.
Update licences
Merge branch 'fix_ping_on_null_connection' into r2.2.1
Bump version to 2.2.1
Update the changelog for version 2.2.1
Update distribution files to version 2.2.1
Update karma installation instructions
Merge branch 'r2.2.1'