Move vendor files to lib/vendor/

This PR works towards #862.