[fix] Infinite loop when first line of file is indented
[fix] Infinite loop when first line of file is indented

In the (syntactically invalid in Python) case in which the first line
(or group of lines) in the buffer is indented, an infinite loop occurs
when the folding routine is executed. The `s:NumContainingDefs` function
walks backwards linewise through the buffer, looking for a line with a
lower indent level than the current. But when it reaches the beginning
of the file, it keeps going backward indefinitely if the indent level is
greater than 0, because `getline(n)` for n < 1 returns the empty string,
enabling the loop to continue.

To avoid this, explicitly check whether we have walked past the
beginning of the buffer and, because no class or function definition can
contain the first line of the buffer, immediately return 0 when this
condition is detected.

Closes #2

tschundler/dotfiles,tschundler/dotfiles,tschundler/dotfiles