moved library reference documentation to doc/library
two more interfaces in portal.rst
add bsv:typedef directive