Theme Installer: Separate API from an event handler to avoid issues where a false return value stops the event.

see #27055.


git-svn-id: https://develop.svn.wordpress.org/trunk@27963 602fd350-edb4-49c9-b593-d223f7449a82