app_record: Fix bug where using the 'k' option and hanging up would trim 1/4 of a second of the recording.

The Record dialplan function trims 1/4 of a second from the end of recordings in case
they are terminated because of DTMF. When hanging up, however, you don't want this to happen.
This change makes it so on hangup this does not occur.

ASTERISK-24530 #close
Reported by: Ben Smithurst
patches:
 app_record_v2.diff submitted by Ben Smithurst (license 6529)

Review: https://reviewboard.asterisk.org/r/4201/


git-svn-id: http://svn.asterisk.org/svn/asterisk/branches/11@428653 f38db490-d61c-443f-a65b-d21fe96a405b