MoH: Don't restart stream on repeated start calls

Currently, music on hold will stop and then start again from the
beginning if ast_moh_start() is called multiple times. This can happen
if a call is put on hold repeatedly (the channel receives multiple
HOLD control frames) and can be triggered from ARI by starting MoH on a
channel multiple times. This is fairly jarring/annoying to users.

This change prevents MoH from being restarted if the requested music
class is the same as the one currently playing.

This includes an extra check to prevent the errors previously
experienced in the testsuite and has 100+ test runs behind it.

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

Merged revisions 416439 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 416440 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: http://svn.asterisk.org/svn/asterisk/branches/12@416441 f38db490-d61c-443f-a65b-d21fe96a405b
Fix string growth algorithm for XML presence bodies.

pjpidf_print() does not return < 0 if there is not enough
room for the document to be printed. Rather, it returns
39, the length of the XML prolog.

The algorithm also had a bug in that it would return if
it attempted to grow the string larger.



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