change to library.cc

finished all library functions, add a filed to Page to keep track of
free pages.