[client] Move some functions from latest_ajax.html to library.js.

getServerLocation()
getItemGraphLocation()

At least former one will be used at severial pages.
[client] Use meaningful variable name.

ip ->
ipAddress
[client] Fix a misleading variable name.

anchor ->
url