build and serialization stuff

Fixed Vaadin Directory maven support stuff (shaded pom not used). Now
shaded dependency declared as optional as a workaround. Also made some
shared classes Serializable.