pretty_symbology: Don't assume the output of U() is not None

U() returns None when unicodedata can't be imported. I'm not sure how to test
this because it's only reproducible if unicodedata from the standard library
can't be imported.  I suppose we could add a hook to test it. It won't be
straight-forward though because the key thing is to make sure it works
correctly at import time.

Fixes #8163.
Fix automatic evaluation for sin/cos(pi*n/2): consider n.is_even case

fixes #8298
Merge pull request #8164 from asmeurer/unicodedata

pretty_symbology: Don't assume the output of U() is not None
Merge pull request #8303 from skirpichev/8298-fix

Fix automatic evaluation for sin/cos(pi*n/2): consider n.is_even case