Pull out implementation of ArrayOfOneDGrids from header

Fixes #40.