Home Formula One Hamilton takes pole in Chinese Grand Prix after nerve-wracking finish