What Warren Buffett learned from his past investment mistakes, including IBM and airlines