A new framework for understanding substrate binding and functional diversity in haem peroxidases