Improve 2D generation speed.

Summary: This improves the speed of generation by ensuring that 2D layers only generate a single Z layer.  This also adds a check to ensure that 2D layers don't have 3D layers as their parent (as this is no longer permitted).

Test Plan: Apply the change and ensure that the world generation and everything still works.

Reviewers: Sabre070

Reviewed By: Sabre070

Maniphest Tasks: T98

Differential Revision: http://code.redpointsoftware.com.au/D64