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
allow asynchronous pages

this allows the showPage to take a second parameter -a deferred object
If given then it shows a loader and attaches a done callback that clears the loader

rearranged showMonumentsList function accordingly
store user location for use elsewhere in app
calculate distance estimate between two points

implement haversine function
display the distance on the search result
add filters to top of list of monuments

this allows filtering of monuments by name, distance and address
it uses a data property 'sortby' to allow extensibility

refactored the rendering of monuments list to attach distance to
monuments pre sort

slight adjustment to css of buttons
add splash screen for when looking up location

geolocation can sometimes take a while - it would be good to tell
users that something is happening so they do not click again
TODO: add some nice graphics here / review copy text
Merge pull request #26 from jdlrobson/38062

38062
Merge branch 'master' of github.com:wikimedia/WLMMobile into async-pages

Conflicts:
	assets/www/js/app.js
Merge branch 'master' of github.com:wikimedia/WLMMobile into async-pages

Conflicts:
	assets/www/js/app.js
sort countries by name (bug 38057)
Merge remote-tracking branch 'jdlrobson/async-pages' into tmp
clear existing search results before a sort

needed due to changes implemented in  444fe0fd0bb16119762ad2c59b3a88ea11a8fba4
on successful location lookup set default sort to distance

this seems to meet user expectation better in my opinion
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)