Dshape parsing bugfixes/changes

This fixes some more bugs in dshape parsing/adds tests for them, and changes parsing so the majority of datashape objects are built in the ply semantic actions.