Late goals from David Mooney and Dean Cox earned Leyton Orient a 2-0 FA Cup first-round win at non-league Gloucester.