Half-lives of cluster radioactivity with a generalized liquid-drop model