Impact of neighborhood energy trading and renewable energy communities on the operation and planning of distribution networks