Implement python code folding detection

will be used once pyQode/pyqode.core#141