Modified beautify for js, css, and html to use current tab/spaces settings

In order to get the preferences I also added a config getPreference to the sandbox api.