fixes for pr#2663

* docstring rewrite
* helpers moved to module level
* tests cleanup
* and so on

You may want to add some notes about algorithms (and limitations of them) from the issue:
https://code.google.com/p/sympy/issues/detail?id=4122
(If you feel this is not done yet)