Add shared library complitation option

Change the compilation options to compile to a shared library rather than
standalone programme.

Some edits to sampling: now collision-free subspace rather than full Fock
space