Japanese police have arrested a student suspected of a hammer attack at a Tokyo university, which local media said left several injured.