Moved functions from util to history and bookmark.

Some of the functions where only used one time, so they where moved to the
place where they are used.
Use titles of url history to filter completion list.