Make SDM compute the base url correctly

In order for GWT RPC to users need to be able to
set the base url for GWT RPC. This can be done by using a meta
tag, a baseurl tag in the dom or can be calculated dynamically.

This also fixes SDM usage for clients running of the local file
system like Phonegap clients, since they do not fail to calculate the
base url for their server anymore.

Bug: issue 8941, issue 8938
Change-Id: I4da959d27ea8f2537f0136ebab015c2e05e92f86
3 files changed