add emgPDF2 library, emgPDF2cli implementation

This commit changes emgPDF2 project to class library type for portability of key functionalities.

Also added is the CLI implementation of this library.