Polish police have arrested a Ukrainian man following a stabbing incident at a monastery that left five people, including three priests, injured.