Update to pdf.js 0.8.999
Add clearPages method
Some code cleaning