Add support for querying hardware as well as instances

    - new sub commands instances and hardware
    - behaviour of hosts subcommand changed to include hardware as well
    - changed internals to avoid duplication of code