change preference data structure.

* old
preference[element_id]['coordinate'] = {'top':..., 'left':...}
* new
preference['coordinates'][element_id] = {'top':..., 'left':...}
store node_style in preference.
improve css.
cleanup HTML.
remove the related edges if a node is removed.
modify grid value.