An association of about two dozen Western New York primary care practices has formed a joint venture with a private-equity-backed medical group, seeking to bolster their financial viability and maintain independence amid a wave of industry consolidation in recent years.