Add tentative support for EAPI6 get_libdir()

Add get_libdir() function to obtain the basename of libdir using
the same algorithm that econf uses.
Add tentative support for EAPI6 einstalldocs function

Add the einstalldocs function to conveniently install documentation
using the default patterns or DOCS and HTML_DOCS variables.