Add update endpoint to API

This allows instructing the agent via an API call to download a new version of itself from the master and apply it.