allow cancelling of an upload during it

note this currently only aborts the last ajax request
depends on #20 which should also close the popup dialog
fix back button for login (bug 38220)

the back button can be an anchor tag as well
Added switch for different login api error states, handling different messaging for different error groups. Attempting to use displayError() now as well.
* Adds 'state' attribute to the login form fields
* Adds corresponding css for when login form fields are in 'error' state
* Moves error messages for login errors to message file
* Highlights username/password field on error
* Uses displayError() function for login errors
* Updates login-failed message to be more generic
* Change popup dialog to not use textarea nor include default 'failure-details' message.
* displayError() now populates dialog HTML inside <p> tags
* added popup-ok message

The only places I see displayError() currently used is in handling failure cases
for image uploads, and the two areas I've implemented for login failures. I'm not sure
what impact these changes will have on image upload failures - I suspect the
'failure-details' message was intended to help wiht the upload failures. If that's
the case, perhaps it can be prepended to the error message prior to display only in
that use case, rather than ubiquitously as it seemed gratuitous for login failure
cases, and I suspect it will be overkill for many other uses of displayError() in
the future.
Merge pull request #27 from jdlrobson/tweaks

Minor tweaks
Addresses issues raised from original pull request
* uses empty() rather than html('')
* partial revert of c570deb
* uses CSS class to apply error styling rather than made-up attribs
Merge pull request #28 from jdlrobson/login38220

fix back button for login (bug 38220)
Merge branch 'master' of github.com:wikimedia/WLMMobile
Merge pull request #21 from jdlrobson/cancelling-upload

allow cancelling of an upload during it
(bug 38153) Implement clustering for Map view
Back buttons now work!

Adding page-link and back classes messes things up
Add support for hardware back button
Exit the app when there is nothing to go back
(bug 38119) Remove DPR specific images

Take the lazy way out and just use 2x images that are scaled
down. We don't have bandwdith constraints so this should do
fine
Generate the list of campaigns + license + cat information dynamically

Currently the campaigns *must* have an entry in both UploadWizard
and in
http://commons.wikimedia.org/wiki/Commons:Monuments_database/Campaign_names
for them to show up. The latter part should be eliminated soon, with
UploadWizard entry being the only criterion
handle geolocation errors better

forward them to error page instead
don't use a textarea for error handling

present more user friendly error messages
blacklist location lookup page from history

when clicking back from a error page we should make sure the user
gets back to the welcome page instead
timeout a geolocation request

it seems in airplane mode the error callback is never called
so we should set a timeout so this gives up looking after some time
(20s for the time being - random choice of number)

note allowing the user to 'go back' is problematic as the request could
still succeed and the callback might fire after the cancel. Pretty sure you
cannot cancel a getCurrentPosition request but may be wrong.