Lewis Hamilton tightened his grip on a fifth Formula One world championship title with victory in the Singapore Grand Prix.