Move write_pbr_json to avoid issues with nose

Put write_pbr_json in pbr.pbr_json so that you do not need to import
pbr.packaging to use it. This avoids python3 errors with nose where nose
is imported by pbr before it is converted to python3 by 2to3 under
python3.

Change-Id: I1c420fed609bc60bbfdf78eb219e067ccab1a61e