Sir William à Court, 1st Baronet — Soldier, Member of Parliament