Atm is the atom resulting from concatenating all atomics in the list Atms in
the order in which they appear. If Atm is an atom at call then Atms can
contain free variables, and multiple solutions can be found on backtracking.
Based on atom_concat/2 of Ciao-Prolog, but without performance issues.