Update AnnotationsBag.php

Adding the replace method and using it to implement the ArrayAccess interface to AnnotationsBag. Now you can access annotations bags attributes like an array