A historic library in the northern city of Tripoli has been torched by unknown assailants, damaging thousands of books and manuscripts.