Law on smacking children explained as doctors demand end to legal protection of ‘reasonable punishment’