Make the tube_connects={} method work properly for technic devices.

Also phase out "old new" API, leaving only the "tube_connects={}" method,
as nothing in technic or pipeworks uses it.

Fix a few more places where minetest.facedir_to_dir() was duplicated, since
that code is part of Minetest 0.4.8.