Update shortcodes.php

The new shortcode (ex. [badgeos_achievement id=206] allows the user to display a formatted badge in any other post. Currently you have to be on a BadgeOS page to see these items.

The submission and nomination shortcodes were extended with an id parameter (ex. [badgeos_submission id=206]). If no parameter is provided they'll simply use $post->ID.

I refactored the badge formatting code into a badgeos_display_badge function so it could be called from more than one place.

I also made changes to support a post id of something other than $post->ID. When a BadgeOS shortcode is used in another posting, $post->ID refers to the non-BadgeOS posting, which has BadgeOS doing the wrong thing.