A court in Egypt has sentenced prominent liberal activist Ahmed Douma to life in prison along with 229 other defendants.