Fetch queue time upfront, before starting/registering the reporter
Fetch queue time upfront, before starting/registering the reporter

Moving the queue time to a variable stored upfront ensures that the time
to run through the start/register of the reporter is not considered as
queue time, otherwise it could cause a slight increase in the time
during the first hit as the reporter is initialized.

Moving to minitest started showing some intermittent errors that helped
indicate this, for example these two seeds reproduced the issue before
this change:

    % bundle exec rake TESTOPTS="--seed=47122"
    ...
    Run options: --seed=47122

    # Running:

    .....F....................................

    Finished in 0.383004s, 109.6594 runs/s, 274.1486 assertions/s.

      1) Failure:
    Judoscale::Middleware::#call::with JUDOSCALE_URL set::when the request includes HTTP_X_REQUEST_START#test_0002_records the queue time in the environment passed on [/Users/carlos/src/judoscale/judoscale-ruby/test/middleware_test.rb:69]:
    Expected |5000 - 5023| (23) to be <= 1.

    42 runs, 105 assertions, 1 failures, 0 errors, 0 skips

    % bundle exec rake TESTOPTS="--seed=1829"
    ...
    Run options: --seed=1829

    # Running:

    ....F.....................................

    Finished in 0.426780s, 98.4114 runs/s, 246.0284 assertions/s.

      1) Failure:
    Judoscale::Middleware::#call::with JUDOSCALE_URL set::when the request includes HTTP_X_REQUEST_START#test_0001_collects the request queue time [/Users/carlos/src/judoscale/judoscale-ruby/test/middleware_test.rb:62]:
    Expected |5000 - 5100| (100) to be <= 1.

    42 runs, 105 assertions, 1 failures, 0 errors, 0 skips

After this change the test errors above are no longer reproducible.

Note: I could not pinpoint what exactly caused the delay on the tests
after a bit of testing / debugging, and stubbing the requests happening
inside the reporter thread wasn't working, but simply stubbing
`Request.start` within the tests did make them pass as well, so it was
definitely the reporter init code causing the delay / test failures,
which helped indicate they were contributing to total queue time here.

adamlogic/rails_autoscale_agent,adamlogic/rails_autoscale_agent,adamlogic/rails_autoscale_agent