Collision detect bug fixes

Fixes dimensions of empty outputs (0x0, instead of 1x0), makes `TaylorVar` inputs work (fixes #142), and adds an option to consider only collisions with the terrain.