A teenager has been arrested over a stabbing at Sydney University that put the campus into lockdown.