Fix stack overflow in navmesh save, stackallow is not scoped to for loop but actually methods, also use writer.BaseStream.Write instear of writer.Write because the latter copies and allocates in Unity... Also fix potential bug in the way we check for null tiles