Add daemon framework for an API server (copied from other parts of Libra)

Change-Id: I7a94a3e2938734ec1594ba33f950aaea14b65980