Move some code from powerline_autodoc to powerline.lib.inspect

To make it available later in lint checker.