Fixed wrong url history loading.

If the history where larger than the maximum allowed size, we read max of the
items from the beginning of the file that are the oldest items, so that the
latest items where discarded.
Merged url_history and history together.

The history mechanism can now handle different types of history and persist
the items into different files.