Fix calendar losing style in some cases and switch passing through the correct element in non inline cases

Fixes #2
Fixes #3
closes #4
Fixes #5
Fixes https://github.com/jquery/jquery-mobile/issues/6952