Rewrote the js structure

I’ve made the structure of the class, plugin wrapper and global
reference a bit more flexible.
Merge branch 'master' of https://github.com/AanZee/validate

Conflicts:
	html/index.html