The mtcAgent's message inbox batch handling was needlessly zeroing a
buffer that it would never use after it reached the last received
message.
This update refactors the mtc_service_inbox entry code so that the
message buffer zeroing operation only occurs on the unused part of
fully received messages. To facilitate this change, a new utility for
zeroing a bounded part of a mtce message buf was introduced to common
utils.
Two additional enhancements were also made to the same procedure:
- variable scoping change.
- hostaddr and hostname lookup scoping change.
Change-Id: Ia2ef97dad611507b824927ed1652c8df8b54eee5
Signed-off-by: Eric MacDonald <eric.macdonald@windriver.com>