Microsoft Corp. scored a major victory in securing a milestone, $10 billion Pentagon contract for cloud computing services. But the contract — unthinkable for Microsoft even a year ago — will likely come at a cost, legal and internal.