Minimal error handling support. Specifically, implement lx_err_set_*(), factor out error handling into its own file, and call that rather than setting it up manually in lx_open().