Add AllowInvalidPlacement check to IsCellBuildable.

Fixes #5902.
This was already a bit hard to read. Since you're fixing it, do you mind making a few more changes?

* 'a' is a really bad parameter name and it shows while reading the code below. Maybe `pos`[`ition`] or `location`.
* 'b' is not great either, something like `unit` or `actor` gives context.
* How about moving the world.Map.Contains(a) check to the top of the method?
* Can you merge this with the dummy overload above by making `toIgnore` a default parameter?