Cherrypick dome more usefull commits from master

@stefano-k I am reluctant to also pull in the new archive format like ar and cab commits by wolfgang. If you also want these in 1.6 let me know and i'll ad them.