add protection
Merge pull request #1626 from dongzha/testcrash1

add protection
(1) Reset parameter set status and clear AU list when out of memory
(2) Free un-complete malloc memory, keep the original state, special when increase memory
Merge pull request #1627 from HaiboZhu/Debug_potential_out_of_memory

Reset parameter set status and clear AU list when out of memory
Merge remote-tracking branch 'upstream/master' into travis.osx