First-principles study of stability and local order in substitutional Ta-W alloys