Experiments and theory on pentacene in the thin film phase: structural, electronic, transport properties, and gas response to oxygen, nitrogen, and ambient air