Simplify: use raw pointers instead of optional wrappers on deque.

3 jobs from master in 3 minutes 33 seconds (queued for 1 second)
Status Job ID Name Coverage
  Build
passed #3659
build_cmake

00:52

 
  Test
passed #3660
run_tests

00:53

 
  Sanitizer
passed #3661
run_address_sanitizer

01:46