Correct prepend method implementation

The prepend method was implemented incorrectly when the container
already contained elements, resulting in nothing on some browsers and
errors in others. Now the 'insertBefore' method is called on the
container element, with the first child of the container used as the
reference element.
Replace flex setters with 'flexible' getter/setter

The existing flex methods used two different methods to set the state of
a component's flexibility, and there was no mechanism to query the
current state of the flexibility. These two methods have been replaced
with a getter and setter for flexibility.