Cleans up perrbuf and error documentation

Given that we no longer need perrbuf, we can also merge ERRSTACKBASE and
ERRSTACK.