pim.c: Refactor in preparation for merge of pim_send() & pim_send_unicast().

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>