That depends: Do you want coolent to start with the start of your Spindle, and it stays on as long as the spindle stays on, or, do you want G-code control like using the M7 or M8. If you want it to start with the spindle, then Use a brain, that if eighther the Spindle cw or ccw LED is on, then it will output to what ever output you want to turn on your outputs.
Yes, you can ref at the end of your G code run, Make a custom Macro that the Reference axis (x, y, z, etc.), is in the Macro.
scott