Grinding machine for cores and samples