cursor: Clean up code flow slightly

Reverse the set of expressions so testing for gbm is at the top.
Make gbm optional

Now it's only required by the native backend. The cursor code is getting
quite messy, but it was already considerable messy to start with.
configure: Actually make gbm optional

Whoops, I made the code work without it, but forgot to strip it from the
actual list of requires packages.

Spotted-by: Rico Tzschichholz <ricotz@ubuntu.com>