Pivot table NxNxN implementation

Cleaned up commits for pivot table implementation, that should merge cleanly onto core. Also includes IE8+ fixes.