Topological descriptors for coral reef resilience using a stochastic spatial model