AutoDSPy: Automating Modular Prompt Design with Reinforcement Learning for Small and Large Language Models