Otto Vilhelm von Königsmarck, 1639-1688