clean mod_register opts before starting the module

fixes #117
do not start nor stop cowboy in mod_metrcis

it is done in the lister section
fixes #212
escape attrs before sending to client

fixes #232
cancel timer by erlang:cancel_timer/1

when it was started by erlang:send_after/3
broadcast bug. This bug lead no presence until reconnect for users that were subscribed by mod_admin_extra_roster
Replace wss_config variable with https_config, fixes #239
Merge pull request #231 from esl/mod_metrics-cowboy-fix

Do not start nor stop cowboy in mod_metrcis
Fix parallel execution of multiple mongooseimctl instances

It seems that jot is commonly available on MacOS X
while flock on Linux.

On MacOS X jot tries to come up with a uniqe nodename by
randomization - this does not guarantee uniqeness,
but has a good chance.

On Linux, without CONNLOCKDIR present flock is not able
to determine a unique nodename for mongooseimctl script instance.
This causes all instances to use the same default nodename
and this causes issues when writing scripts using mongooseimctl.
Add registration_watchers as a variable
Merge pull request #213 from esl/registration-watchers

Registration watchers
Move jid and iq types to jlib, add jlib:jid_to_lower/1
Bump rebar, add Make task for ct & ct tty hook
Add mod_amp, model files and tests
Add common test log dirs to .gitignore
Enable mod_amp in ejabberd.cfg
Parallelize common tests
Add mod_amp documentation in markdown format
Show ejabberd.cfg after travis test
Spaces instead of tabs, emacs
Turn mod_amp on by default (testing travis)