Sending the eth contained in a contract to another account (be it an account or another contract) is pretty straightforward:
beneficiary.transfer(this.balance);
will do the trick.
As for tokens, it is not that simple.
Tokens don't reside in your own contract. They re kept in a balance inside the token contract. You (or your contract) just happen to have access to part of those tokens.
For your contract to be able to transfer the token it owns to another account or contract, you would have to call the following ERC20 function inside your contract.
function transfer(address _to, uint _value) returns (bool success);
This will work from the contract as long as it is the actual owner of those tokens.
If you wanted to have your contract transfer tokens owned by someone else, that someone else would have to give your contract an allowance first and then your contract would have to call transferFrom.
function approve(address _spender, uint _value) returns (bool success);
function transferFrom(address _from, address _to, uint _value) returns (bool success);
For your contract to be able to refund tokens that were sent to it by mistake, it would have to implement a function similar to this:
function refundTokens(address _token, address _refund, uint _value) onlyOwner {
require(_token != this);
ERC20 token = ERC20(_token);
token.transfer(_refund, _value);
RefundTokens(_token, _refund, _value);
}