The star of Top Gun and The Doors was a leading man whose career was far from predictable