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
Merge remote-tracking branch 'upstream/master' into con
fix wider_unknown_count
Merge remote-tracking branch 'upstream/master' into con