NGC 6845: metallicity gradients and star formation in a complex compact group