Cleaned up JS code

Reindented RATTIC function
Cleaned up variable declarations
Semicolon fixing
Removed more trailing commas
Removed trailing spaces, added semicolons
Made button click variables local
Scoped some url related vars
Added local variable scoping to 'me' and 'options'
Added local variable scope to 'button'
Scoped some more variables to local scope
Scoped target, targets, mystatus, me and input
Scoped text, clip, form, hideTimeoutId
Scoped inputval, message, ajax, input
Scoped iconname, txtfield, imgfield, target
Code formatting issues
Scoped 'ajax' to a local variable
More code cleanup
Make the password field optional.

This means that users can now upload files only.
Fixes #261
Merge branch 'clean-up-ready-function' of github.com:CaseyLeask/RatticWeb into CaseyLeask-clean-up-ready-function