core: Implement "center of gravity" option for crops

No frontend yet, just the logic for specifying the cropping coordinate.