Fixed call of OnDeinit when deleting an Expert Advisor using the ExpertRemove function during testing. Previously, under the conditions described the OnDeinit event was not called. Fixed errors in use of resources in EX5 libraries.