Bug 1051100 - [B2G] [Homescreen] Multiple lines are displayed when movin...

...g apps to the bottom of the Homescreen

* Before adding a horizontal divider on the vertical homescreen, check if one is needed.
I had a look into the grid.removeUntilDivider(). Actually the code here is not for removing empty placeholders. What's behind the scene is a bit complicated.

When a user drags a icon over another icon or placeholder in edit mode, it triggers gridview.render(). In the render() it first checks and removes placeholders with removeAllPlaceholders(), if not in edit mode. Then it runs cleanItems() to add a divider if the last item is not one, and also creates additional placeholders at the end. So when ever render() is called in edit mode, the last item will always be a placeholder and one new divider gets created.

According to the original design, the fix here is to check if the items under the last divider are all placeholders, which means there is already an empty block at the end of the verticalhome and we don't need to add a new empty block for it.