Optimize msg_box function

Make it more object oriented and fill the documentation with more
detailed information about box types, buttons and return values.