CRAS: audio_thread - fetch based on adjusted amount.

The decision to fetch audio from a client during playback should be
based on the adjusted level.  When there is a min_buffer_level set, the
callback needs to be made earlier so that that level can be maintained.
Worse, the sleep level was already accounting for the adjustment, leading
to always sleeping for 0 samples for devices that have adjusted levels.

BUG=chrome-os-partner:25220
TEST=Play youtube on panther, check cpu usage.  Added unit test to check
this is done correctly.

Change-Id: I02c82876e330cd42993d48e15bf48bda76c2bc22
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/184450
Reviewed-by: Hsinyu Chao <hychao@chromium.org>
Reviewed-by: Chih-Chung Chang <chihchung@chromium.org>
Initial conversion of size_t/long to fixed width types.
Pack all structures.
Add test.
Move timespec to cras_timespec.
Fix tests to use cras_timespec when needed.