seperate out the terminal functions from lxc to the pkg/term

  Since these functions are indepenent of lxc, and could be used by
  other drivers. Like for #4184

Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)