Better AMD by depending on jquery.

Also fixed vex.dialog so that it would work under AMD (it couldn't use `vex.dialog`, it needed to refer to `dialog` instead).