Voicemail: get correct duration when copying file to vm

Changes made during format improvements resulted in the
recording to voicemail option 'm' of the MixMonitor app
writing a zero length duration in the msgXXXX.txt file.

This change introduces a new function ast_ratestream(),
which provides the sample rate of the format associated
with the stream, and updates the app_voicemail function
for ast_app_copy_recording_to_vm to calculate the right
duration.

Review: https://reviewboard.asterisk.org/r/3996/
ASTERISK-24328 #close
........

Merged revisions 423192 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@423193 f38db490-d61c-443f-a65b-d21fe96a405b