A Morse index formula for periodic brake orbits of reversible mechanical Lagrangian systems