Move user-agent parsing from wsapi into kpi.js

    And update all callers to pass in the user-agent header to kpi.js