Ex-Republic of Ireland footballer Anthony Stokes has avoided jail on appeal for a cocaine seizure and a high car chase in Dublin.