Add declaration of g_error_new_valist().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Massive use of MC_PTR_FREE macro.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>