Thousands pay tribute to ex-pope Benedict at lying-in-state