meson: Move libdl_dep to the top level
Instead of letting each directory to find its way to link with libdl, it is easier to put the check in the top level, so its result can be used by all directories.
It is a follow-up of !810 (merged).
Edited by Ting-Wei Lan