Medprompt: Elevating GPT-4 Performance in Medicine and Beyond through Intelligent Prompting Strategies