Rework liang-barsky interface

Current interface has statics in the library, isn't thread safe, etc.