Libya's renegade general declares ceasefire, ending nine-month attack on capital