rtmp: Don't send every flv packet in a separate HTTP request in RTMPT

Add a new option 'rtmp_flush_interval' that allows specifying the
number of packets to write before sending it off as a HTTP request.

This is mostly relevant for RTMPT - for plain RTMP, it only controls
how often we check the socket for incoming packets, which shouldn't
affect the performance in any noticeable way.

Signed-off-by: Martin Storsjö <martin@martin.st>
