Affleck, Philip, 1725-1799, Admiral