Sir John Beresford, 1st Baronet — officer in the Royal Navy (1766-1844)