First-principles study of cation and hydrogen arrangements in the Li-Mg-N-H hydrogen storage system