Re-enable XML-based history plugin, fix history file saving
The history plugin port was not completed, so it is disabled.
This patch re-enables it, fixes it's building failures and fixes
not saving the history file when the directory doesn't exist.
Tested last messages appearance on reopening a chat window,
using Jabber and Test Protocol.
REVIEW: 130154