Use internal functions for font-lock-doc-face

This gets rid of the big regular expression and hopefully speeds up
execution of the function. This also allows empty lines to occur
between the definition and docstring, along with any comments.
Docstrings may also be at the beginning of a file

Apart from appearing at the start of a class of function/method
definition a docstring may also appear at the beginning of a file.
python-mode very slow, lp:1107037, fixed

merged branch by Tom Willemsen
2013-02-02 Docstrings may also be at the beginning of a file