Test if row parameter is an empty object before iterating through it.
Test if row parameter is an empty object before iterating through it.

In this way backend doesn't have to throw away the row object and
just send to JS an empty row object to disable row actions.
Also added a little function to test if an object is empty, taken
from jQuery 1.4 source. This function can be thrown away when we'll
upgrade to that version.

MatthewWilkes/mw4068-packaging,MatthewWilkes/mw4068-packaging,MatthewWilkes/mw4068-packaging,MatthewWilkes/mw4068-packaging