CB-4908 Long.valueOf(0) instead of new Long(0)

Use Long.valueOf(0) instead of new Long(0). Also do the same for new
Integer(0).

Reason:
http://stackoverflow.com/a/13145360/1412800