chore(library/Makefile.common): use structured Makefile

 - 'library/Makefile.common' has the common features
 - 'library/standard/Makefile' and 'library/hott/Makefile' just include
   'library/Makefile.common'
 - simplify extract_deps and put it under library/