MAINT: Use ast.literal_eval in safe_eval.

This does what is needed now that the compiler module is no longer
used.
DEP: Deprecate SafeEval class.

The class is no longer used in numpy and was never exported.
Merge pull request #5192 from charris/deprecate-safeeval-class

Deprecate SafeEval class