Herath hat-trick puts Lanka on top in Galle