Proactively validate that distributable session attributes are Serializable

From SRV-7.7.2:
"The distributed servlet container must throw an IllegalArgumentException for objects where the container cannot support the mechanism necessary for migration of the session storing them."

Also, improve DIST_ASYNC compatibility by using FORCE_SYNCHRONOUS flag where cache write result is required.