Serialization cleanup: use enum for nType arg.

It was almost faster to make it an enum than to make sure the value did what I guessed it did...
Thanks, will rebase (seems I don't have qt libs installed, so missed some files).

Yes, as per the commit msg, it hasn't been a bitfield since:
  commit e754cf4133c9c97e320ae5dec394e338524e650b
  Author: Pieter Wuille <pieter.wuille@gmail.com>
  Date:   Wed Nov 14 22:18:10 2012 +0100