GRIND-44: Removed duplicate ensure_cloudinit calls
Add an "encoding" attribute to the pytest stdin capturing because nova api
calls into sys.stdin.

Change-Id: Ied14493dbfac49d888edb3f143ea81a600258e67