Fixed LiveBeansView to not produce invalid JSON if last bean is not eligible

Also introducing overridable isBeanEligible template method.

Issue: SPR-11366
Polishing