Feasibility of a quantum memory for continuous variables based on trapped ions: from generic criteria to practical implementation