Workaround bug in yum python API

This works around a bug in the yum python API where removal of packages
that are required by other packages results in the removal of those
packages as well, and does not raise an exception when errors are
encountered during the transaction test, causing all packages to be
removed.

This commit manually performs the transaction test, and raises an
exception if any errors are found. It also adds a try/except to the
pkg.removed and pkg.purged states which catches the exception and
gracefully returns False without a traceback.

See https://github.com/saltstack/salt/issues/8201 for more information.
more tabs!
fix function： leaks，serverinfo

#salt 'web-87' tomcat.leaks
web-87:
    F
    a
    i
    l
    e
    d

    t
    o

    c
    r
    e
    a
    t
    e

    H
    T
    T
    P

    r
    e
    q
    u
    e
    s
    t

#salt 'web-87' tomcat.serverinfo
web-87:
    ----------
    error:
        F