Dirac operators and Batalin-Vilkovisky quantisation in noncommutative geometry