Fixed issues with AVs in TBPLLoader

Fixed issues when finalizing unloaded packages and cleaning up not completely loaded ones
Fixed issues when chain loading external dependencies (BPL/DLL)
Added more complicated test cases