Speed improvement - tile ids now sorted in sql query rather than on
client

Change-Id: I9286e9ebf8ea8122be691da3b8c1ec5217d5f572
Fixed bug where required points would get removed before optional,
invalidated ones.
queryBounds for vertices are now the triangle bounds rather than polygon
bounds.

Change-Id: I1356d215061560114b0658f781b7fb8a22b334aa