allow any serializable java objects as element properties

Hi Shuang or Alex, 
Could you take a look at this and merge it if it looks ok ?

I do realise we could now lump Date in with all the other java serializable objects, but I'm leaving it as a separate case for now. 

shaun