Loci and maximum size of thrust earthquakes and the mechanics of the shallow region of subduction zones