configure: Restore doc option to disable building the documentation

Also add appropriate dependency declarations for perl and texi2html.
build: Check for pod2man instead of perl for manual page generation

Some systems provide Perl without pod2man.