replace most of jquery function calls with string concatenation in populate()

This significantly speeds up the time populate takes on large datasets.

With 6000 entries the time goes from 980ms to 760ms. A performance increase of 22%.

Also see relevant discussion in #781