validate returned iterator before passing to get_buffer

This avoids crashing in get_buffer when get_iter returns empty iter.
Unfortunately get_iter doesn't return any indications if it
succeded (and filled the passed reference with useful information)
or failed (and didn't touch the references iter).
An improvement of the gtksourceview API might be useful here.
For now, work around this by knowing that vala will create an
empty iter used as reference to get_iter and then compare it
against another empty iter to know if get_iter succeded or failed.

https://bugzilla.gnome.org/show_bug.cgi?id=727250
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=742840