Move all example programs to doc/examples

Also drop support for building examples in library directories.