refactor get_console_output() for console logfiles
refactor get_console_output() for console logfiles

Refactor/simplify libvirt get_console_output() to allow integration
of other console types from the hosts XML description

completely restructure get_console_output():
- make common code flow visible,
  including output and exceptions
- simplify selection of console sources with one extensible struct
- common checks for each error type (console not found/file not found)
- extract pty-specific code

functional changes:
- none

side effects:
- Existence of pty-type consoles is now explicitly checked by the code and
  returns the same 'console logfile for instance does not exist' message
  as the  filebased console. Before, this case most likely triggered some
  obscure logmessage from readpty(). API-functionality is unchanged by
  this, both old and new code return an empty string.

Closes-Bug: #1776481
Change-Id: I3eac592f938a8d4ba813df535070e99b3130e863

klmitch/nova,openstack/nova,rahulunair/nova,mikalstill/nova,mahak/nova,rahulunair/nova,klmitch/nova,openstack/nova,klmitch/nova,klmitch/nova,openstack/nova,mikalstill/nova,mahak/nova,mahak/nova,mikalstill/nova,rahulunair/nova