Cleans up peripheral connection callback handling.