Use "let ref" with raw pointers and derive Copy when required

This is the minimal set of changes that is needed to compile this
project with the latest nightly. Many more structs will probably also
want Copy (as shown by the warnings), but I'll leave that for other
people to decide.