MERGED: Put library docs in a $pkg, rather than $pkgid, directory; fixes trac #1864