Libyan unity govt, militia hammer out Tripoli ceasefire