Gerstenhaber and Batalin-Vilkovisky structures on modules over operads