Avoid multiple blank lines with --syntax-check

  Only print a blank line between plays when also doing --list-hosts and/or
  --list-tasks, otherwise this output just a long list of blank lines, one for
  each play.
Merge pull request #8721 from sergevanginderachter/syntax_check_avoid_blank_output

Avoid multiple blank lines with --syntax-check