wal: implement initial decoding

This is the start of our WAL implementation. It is still a work-in-progress. Feedback at anytime is welcome.