Re-register SpringApplication listeners in context once it is available

Fixes gh-1141