Handle memory allocation errors in Polly, STC and TCB loaders

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Handle memory allocation errors in Digitrakker loader

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Finish replacing loader macros with functions

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>