Stop using deprecated constraints-based version of CreateAudioSource.

Also did some slight refactoring of the code that turns constraints
into rtc::Optionals. Used a template method to avoid code duplication,
and used the same pattern for "CopyConstraintsIntoAudioOptions" as was
being used for "CopyConstraintsIntoRtcConfiguration".

BUG=webrtc:6752

Review-Url: https://codereview.webrtc.org/2628523003
Cr-Commit-Position: refs/heads/master@{#16063}
diff --git a/webrtc/api/mediaconstraintsinterface.h b/webrtc/api/mediaconstraintsinterface.h
index a5d16cb..2017890 100644
--- a/webrtc/api/mediaconstraintsinterface.h
+++ b/webrtc/api/mediaconstraintsinterface.h
@@ -141,6 +141,11 @@
     const MediaConstraintsInterface* constraints,
     PeerConnectionInterface::RTCConfiguration* configuration);
 
+// Copy all relevant constraints into an AudioOptions object.
+void CopyConstraintsIntoAudioOptions(
+    const MediaConstraintsInterface* constraints,
+    cricket::AudioOptions* options);
+
 }  // namespace webrtc
 
 #endif  // WEBRTC_API_MEDIACONSTRAINTSINTERFACE_H_