Fix broken documentation in Lib

Fixing a whole bunch of documentation errors as reported by the
PHPStorm code analysis. Along with some obvious typos.

If you think I did something wrong, please ask.

Change-Id: I47988f27230e3d14f767e5fe393ef58e3d828b2d
Merge "Fix broken documentation in Lib"