Serialization for EXECUTE and EXECUTE_SUCCESS

Might be room for improvement - three traversals of the vector are done
in serializing (one for computing space, one for serializing the
contents, the last for serializing the data at the end).