Split history_get function into two parts.
Changed history stepping to act like in vim.

Now the history isn't wrap searched. The history can only be started in
previous direction. The latest entry in next direction (latest item) is an
empty items so that we print only the prefix into the input box.

Further the g_list_get_nth_data() was removed, because this is slower than
stepping through the list direct via previous and next.