France has promoted a soldier who was wrongly sent to prison 130 years ago for a crime he did not commit.