Bound request cost, harden JSON handling and cache
Reject fields whose covering needs more than 4^11 density samples (a
hemisphere-sized field needed several billion and could exhaust memory),
skip rasters outside the sampled extent, flush the density cache at
100,000 entries, reject NaN/Infinity and deeply nested JSON with 400,
send CORS headers on 500 responses, and accept ASCII coordinates only.