MedAgentsBench: Benchmarking Thinking Models and Agent Frameworks for Complex Medical Reasoning