cli: move history management to the core

Change-Id: I588d8df43f7af186da09ba9ed567cd89943cbe73
Signed-off-by: Michael pasternak <mpastern@redhat.com>