[cli] move cli and cli history to util/