build: Make into a built library, set up test infrastructure

Imported test infrastructure from the VisualEditor repository where
this library used to be maintained.

Change-Id: I2ddd10bba5440300915b43b548ad0acab79ceab0