Use js templates in OC.dialogs etc.

Other changes:

* It only uses one request to get files and dirs.
* Replaced the select/dropdown with a slug-like path. More intuitive imo.
* There can only be one filepicker at at time. If one is open it will be destroyed.
* The dialog now cleans up the DOM after closing.
* Removed methods prompt() and form().
* General cleanup.

@Kondou-ger @raghunayyar