use specialized shader for line-based render modes

This required a change in how shaders are in object. Fixes #6 and lays
the basis for #5.