Add a replace command to the facts plugin

The replace command is a shortcut for removing an existing fact then
adding a new definition for the same term.