Separate ccache display and checking in klist

In klist, use separate functions to display a ccache and check its
status.  Also use a helper function to check if a credential's server
principal is the local krbtgt principal for the realm.
Improve klist check for expired cache

Make klist -s succeed for a cache which contains a non-expired
credential and no TGT cred.

ticket: 8022
Fix klist -A -s output

In show_all_ccaches, don't output newlines if status_only is set.
Add tests for klist -s