Stop wasting time in abm - performance improvement

Unless I'm mistaken, the chunk of code I'm moving there is potentially
executed hundreds of times inside the loop to get the exact same result
every time
Merge remote-tracking branch 'minetest/master'

Conflicts:
	src/environment.cpp