How to add an Actionbar to your SettingsActivity with AppCompat v21

A couple of days ago the Android group released a new AppCompat library that among other things added a number of new widgets for developers to take advantage of. One of these new widgets is the Toolbar, which according to its description is a widget based generalization of the much loved Actionbar. Looking further at the documentation it become apparent that the Toolbar supports most of the features that the Actionbar does such as having a navigation button, a logo, a title and subtitle, custom views and an action menu. So what is the difference between the two? The Toolbar is a widget so it can be included in a layout and used like any other ViewGroup. This also means that it can be used for uses not suppored by the Actionbar for example multiple Toolbars can exist in the same layout and they can be use in Activities that don't extend from ActionBarActivity like PreferenceActivity.