cashew: prevent nested byte counter deletion

When a byte counter is deleted, the byte counter makes a final stats
report to its delegate. It's possible for the callback handler for this
report to decide to delete the byte counter, causing a nested deletion.

Repro steps for this issue are to connect to 3G and then disable mobile
data from the internet settings page.

This CL prevents this nested deletion by changing
DataPlan::OnByteCounterUpdate not to stop the byte counter if there are
no active plans.

This CL also fixes some minor cpplint errors.

BUG=chromium-os:20144
TEST=unit tests and manual testing on device

Change-Id: I82998f5a610b13be808251b36934d3b7c29bad0d
Reviewed-on: http://gerrit.chromium.org/gerrit/10282
Tested-by: Vince Laviano <vlaviano@chromium.org>
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Commit-Ready: Vince Laviano <vlaviano@chromium.org>
6 files changed