Use PrettyTable's print_empty flag.

Previously an if statement was added to prevent empty tables from being
printed. This introduced a bug as len() was called on objs which in some
cases is a generator.

This patch removes the if statement and sets prettytable's print_empty
flag to ensure that empty tables are not printed.

Adds tests for utils.print_list with list, empty list and generator input.

Fixes: bug #1180059

Change-Id: I4c0bd08bf0c943de42ad90d255a2d831c2e98828