On Firefox 24, you can do something similar per-page with Firebug. In Firebug's CSS pane, right-click and select New Rule. The rule is:
html * { border: 1px solid #00f !important }
"html *" selects all elements in the document, and "!important" overrides other stylesheet settings. You could apply this to all pages using a Greasemonkey script; example here
edit This shows you the border and the padding for any particular element but doesn't show that element's margins in the CSS box model. However, the outline on a parent element will include the margins of child elements. For example, on the html
<html><body><div style="width: 200px">
<p style="margin: 50px;">Lorem ipsum</p></div>
</body></html>
the Firebug technique shows (annotations in purple):