MFV r275550:

In addition to r273158, make the code in spa_sync() that checks if the
current TXG is a no-op TXG less fragile.

Illumos issue:
    5347 idle pool may run itself out of space

MFC after:	2 weeks


git-svn-id: svn+ssh://svn.freebsd.org/base/head@275781 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f