Replace url formats with a buildUrl function

This commit adds buildUrl to enable arbitrary beehive url
schemes (e.g., http, https, ...).
Change api URLs

/hive/* -> /api/*
Add api for hive state

State is an api endpoint that returns the current state of the hive.
That includes its id, its address, and the list of its peers.
Change default raft tick to 100ms
Use state api to fetch peer infos
Refresh peer info only if there is no meta

When there is an existing meta file, we skip refreshing peers. This
makes implementation simpler but it's not ideal. We will improve on
this later.