Give APInt move semantics.

The interaction between defaulted operators and move elision isn't
totally obvious, add a unit test so it doesn't break unintentionally.