LPS-43292 Add the ability to cleanup a BeanLocator's resources