Spontaneous and field-induced magnetic transitions in YBaCo2O5.5