Multimer formation in one-dimensional two-component gases and trimer phase in the asymmetric attractive Hubbard model