* create Volume struct for use with Cache
* add "volume" file to Cache
* load cached volume on start, intial overrides cached overrides default
* amend volume_to_mixer function to cache the volume on every change
* pass cache to Spirc and SpircTask so volume_to_mixer has access
* rustfmt changes
* revert volume_to_mixer function and Spirc/SpircTask cache variable
* Volume implements Copy, pass by value instead of reference
* clamp volume to 100 if cached value exceeds limit
* convert Volume to u16 internally, use float and round to convert hex->dec
* convert initial_volume and ConnectConfig.volume to u16 as well
* add cache_volume function to SpircTask
* remove conversion to/from percentage on cached volume
* consolidate device.set_volume, mixer.set_volume, and caching
* streamline intial volume logic
1) A queued track is removed once it has become the current track.
Note that the track doesn't need to actually play i.e. it could
have been immediately skipped over with 'next()'. This is
implemented in 'consume_queued_track()'.
2) Queued tracks are always positioned immediately after the current
track. 1) ensures this is true for 'next()' but 'prev()' requires
all the queued tracks are actually moved for this to remain the
case.
Also fixed the case where 'prev()' on the first track would incorrectly
wrap back around to the last track even when repeat was disabled. The
correct behaviour is to remain on the first track and just seek to the
start.
For example, with the following tracks and repeat enabled:
TrackA, TrackB, TrackC-Q, TrackD-Q, TrackE
^^^^^^
Here, the result of 'prev' changes the current track from TrackB to
TrackA and the queued tracks (TrackC, TrackD) move to the position
immediately after TrackA:
TrackA, TrackC-Q, TrackD-Q, TrackB, TrackE
^^^^^^
Calling 'prev' again results in the current track wrapping back around
to TrackE and the queued tracks moving after that same track:
TrackA, TrackB, TrackE, TrackC-Q, TrackD-Q
^^^^^^