From tomatoes and peas to herbs and flowers, compatible plant pairings improve growth, deter pests and make the most of limited space.