Manual tests fixed

Removing inline scripts from mobile-spec to make it compatible with FFOS priveleged type apps (i.e. using contacts)

added addListenerToClass function which is used to connect buttons with test functions.

Please check it on all platforms and r+ if working.

moved test initialization to JS file (for DRY and privileged apps compatibility)
Merge branch 'master' into ffos_privileged_compatible
Merge branch 'ffos_privileged_compatible' into mozilla-dev

Conflicts:
	autotest/pages/contacts.html
	battery/index.html
	contacts/index.html
	contacts/index.js