Add additional checks in ObjectInputStream

Thanks to Jann Horn for reporting a bug in ObjectInputStream
and sending the initial patch.

Add some checks that the class of an object
being deserialized still conforms to the requirements
for serialization.

Add some checks that the class being deserialized matches
the type information (enum, serializable, externalizable)
held in the stream.

Delayed static initialization of classes until the
type of the class has been validated against the stream
content in some cases.

Added more tests.

Bug: 15874291
(cherry picked from commit 738c833d38d41f8f76eb7e77ab39add82b1ae1e2)

Change-Id: I9f5437ed60936882de56589537176466624e631d
MimeUtils: add ODF presentation (template)

If ODF text, spreadsheet and graphics is there, then leaving out
presentation makes little sense.

Change-Id: I676546a51700cbafb31f1b394ea32a66603422af
Merge branch 'cm-11.0' into stable/cm-11.0