The inside story of how the AFL tackled its racism