add serialize extension method.

Implement serialize method according to description on http://api.jquery.com/serialize/