Ferroelectric crystals with giant electro-optic property enabling ultracompact Q-switches