WordPress + Bootstrap: Replace primary navigation menu on mobile?

All you have to do is to change the name of the menu location.

Change the line where it says:

'theme_location'    => 'primary',

to

'theme_location'    => 'sidebar',

and viceverse.

That should do the trick.

However, you should keep in mind that this kind of setup can become pretty confusing.
(In case you mistake one for the other and start looking at the wrong positions etc.)