Extract tile cover algorithm to TileCoord

While here, remove sorting, as Source immediately
re-sorts.
Simplify
Fix setting debug flags before style load
Use util.clamp
Make wrap & clamp more similar