World champion Mark Selby won his second China Open title in three years with a thrilling 10-8 win over Mark Williams in Beijing.